<% layout('/layouts/default.html', {title: '准考证号管理', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i class="fa icon-note"></i> ${text(texaminationTicket.isNewRecord ? '新增准考证号' : '编辑准考证号')}
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>
		<#form:form id="inputForm" model="${texaminationTicket}" action="${ctx}/zx/examination/ticket/texaminationTicket/save" method="post" class="form-horizontal">
			<div class="box-body">
				<div class="form-unit">${text('基本信息')}</div>
				<#form:hidden path="id"/>
				<#form:hidden path="vipId"/>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2"><span class="required">*</span>${text('头像')}：</label>
							<div class="col-sm-10">
								<#form:fileupload path="headPortrait" 
								id="headPortrait" 
								returnPath="true"
								filePathInputId="headPortrait"
								maxUploadNum="1"
                                imageMaxWidth='160'
								imageMaxHeight='200'
								uploadType="image" class="required" readonly="false"/>
								<#form:input path="headPortrait" name="headPortrait" class="form-control required hide"/>

							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6 hide">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('用户标识')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="userId" maxlength="50" class="form-control"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group hide">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('考试标识')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="examId" maxlength="50" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('考试名称')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="examName" maxlength="50" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('考生姓名')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="studentName" maxlength="50" class="form-control required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('身份证号')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="idCard" maxlength="50" class="form-control required idcard"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('考生单位名称')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="officeName" maxlength="250" class="form-control required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row hide">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('单位标识')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="officeId" maxlength="50" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
				
				<div class="row">
				    <div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('性别')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="sex" maxlength="50" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('考场名称')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="examRoom" maxlength="50" class="form-control required"/>
							</div>
						</div>
					</div>
					
				</div>
				<div class="row">
				    <div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('考点')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="examPoint" maxlength="100" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('座位号')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="seatNum" maxlength="30" class="form-control digits required"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
				    <div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required">*</span> ${text('考场地址')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="roomAddress" maxlength="200" class="form-control required"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
							<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required">*</span> ${text('实操地址')}：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<#form:input path="actualAddress" maxlength="200" class="form-control required"/>
								</div>
							</div>
						</div>
				</div>
				<div class="row">
				    <div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('理论考试时间(开始)')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="theoryStarttime" readonly="true" maxlength="20" class="form-control Wdate"
									dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('理论考试时间(结束)')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="theoryEndtime" readonly="true" maxlength="20" class="form-control Wdate"
									dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});"/>
							</div>
						</div>
					</div>
					
				</div>
				<div class="row">
				    <div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('实操开始时间')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="actualStarttime" readonly="true" maxlength="20" class="form-control Wdate"
									dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});"/>
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('实操结束时间')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="actualEndtime" readonly="true" maxlength="20" class="form-control Wdate"
									dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true});"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<% if (hasPermi('zx:examination:ticket:texaminationTicket:edit')){ %>
							<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
						<% } %>
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});
</script>